package com.huawei.esdk.tp.cxf.enumgen;

public abstract class SiteTypeMapping
{
    
    public final static int NONE = 0;
    
    public final static int SITE_TYPE_AUTO = 1;
    
    public final static int SITE_TYPE_E_1 = 2;
    
    public final static int SITE_TYPE_ISDN = 3;
    
    public final static int SITE_TYPE_IP = 4;
    
    public final static int SITE_TYPE_PSTN = 5;
    
    public final static int SITE_TYPE_4_E_1 = 6;
    
    public final static int SITE_TYPE_SIP = 7;
    
    public final static int SITE_TYPE_VO_IP_SIP = 8;
    
    public final static int SITE_TYPE_VO_IP_H_323 = 9;
    
    public final static int SITE_TYPE_SIP_TP = 10;
    
    public final static int SITE_TYPE_H_323_TP = 11;
    
    public final static int MIN = 0;
    
    public final static int MAX = 11;
    
    public static Integer enum2Int(SiteType videoFormat)
    {
        if (null == videoFormat)
        {
            return null;
        }
        switch (videoFormat)
        {
            case NONE:
            {
                return NONE;
            }
            case SITE_TYPE_AUTO:
            {
                return SITE_TYPE_AUTO;
            }
            case SITE_TYPE_E_1:
            {
                return SITE_TYPE_E_1;
            }
            case SITE_TYPE_ISDN:
            {
                return SITE_TYPE_ISDN;
            }
            case SITE_TYPE_IP:
            {
                return SITE_TYPE_IP;
            }
            case SITE_TYPE_PSTN:
            {
                return SITE_TYPE_PSTN;
            }
            case SITE_TYPE_4_E_1:
            {
                return SITE_TYPE_4_E_1;
            }
            case SITE_TYPE_SIP:
            {
                return SITE_TYPE_SIP;
            }
            case SITE_TYPE_VO_IP_SIP:
            {
                return SITE_TYPE_VO_IP_SIP;
            }
            case SITE_TYPE_VO_IP_H_323:
            {
                return SITE_TYPE_VO_IP_H_323;
            }
            case SITE_TYPE_SIP_TP:
            {
                return SITE_TYPE_SIP_TP;
            }
            case SITE_TYPE_H_323_TP:
            {
                return SITE_TYPE_H_323_TP;
            }
            default:
            {
                return null;
            }
        }
    }
    
    public static Integer string2Int(String videoFormat)
    {
        return enum2Int(SiteType.valueOf(videoFormat));
    }
    
    /**
     * 此处需要加一个默认值
     * 当用户没有输入值的时候使用SiteType.SITE_TYPE_IP;
     * 用户输入错误时，返回null
     * @param num
     * @return
     */
    public static SiteType int2Enum(Integer num)
    {
        if (null == num)
        {
            return null;
        }
        
        switch (num)
        {
            case NONE:
            {
                return SiteType.NONE;
            }
            case SITE_TYPE_AUTO:
            {
                return SiteType.SITE_TYPE_AUTO;
            }
            case SITE_TYPE_E_1:
            {
                return SiteType.SITE_TYPE_E_1;
            }
            case SITE_TYPE_ISDN:
            {
                return SiteType.SITE_TYPE_ISDN;
            }
            case SITE_TYPE_IP:
            {
                return SiteType.SITE_TYPE_IP;
            }
            case SITE_TYPE_PSTN:
            {
                return SiteType.SITE_TYPE_PSTN;
            }
            case SITE_TYPE_4_E_1:
            {
                return SiteType.SITE_TYPE_4_E_1;
            }
            case SITE_TYPE_SIP:
            {
                return SiteType.SITE_TYPE_SIP;
            }
            case SITE_TYPE_VO_IP_SIP:
            {
                return SiteType.SITE_TYPE_VO_IP_SIP;
            }
            case SITE_TYPE_VO_IP_H_323:
            {
                return SiteType.SITE_TYPE_VO_IP_H_323;
            }
            default:
            {
                return null;
            }
        }
    }
    
}
